class Draw {
    private int height;

    public Draw(int height) {
        this.height = height;
    }

    public void san() {
        for (int i = 0; i < height; i++) {
            for (int j = 0; j < height - i - 1; j++) {
                System.out.print(" ");
            }
            for (int k = 0; k < 2 * i + 1; k++) {
                System.out.print("*");
            }
            System.out.println();
        }
    }

    public void ju() {
        System.out.println("绘制矩形:");
        for (int i = 0; i < height; i++) {
            System.out.println("*****");
        }
        System.out.println();
    }

    public void zheng() {
        System.out.println("绘制正方形:");
        for (int i = 0; i < height; i++) {
            for (int j = 0; j < height; j++) {
                System.out.print(" *");
            }
            System.out.println();
        }
        System.out.println();
    }

    public void ping() {
        System.out.println("绘制平行四边形:");
        for (int i = 0; i < height; i++) {
            for (int j = 0; j < height - i; j++) {
                System.out.print(" ");
            }
            for (int j = 0; j < height; j++) {
                System.out.print("*");
            }
            System.out.println();
        }
        System.out.println();
    }
    
    public static void main(String[] args) {
        Draw d1 = new Draw(5);
        d1.san();
        d1.ju();
        d1.zheng();
        d1.ping();
    }
}